<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>     
<!-- 该JSP已停用 -->
<title>商户初审</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/divTuo.css"/>" type="text/css"
	rel="stylesheet" />

<script type="text/javascript"
	src="<s:url value="/js/jquery-1.3.2.js" />"></script>
	<script type="text/javascript"
	src="<s:url value="/js/jquery.blockUI.js" />"></script>
	
<script type="text/javascript"
	src="<s:url value="/js/jquery.validate.min.js" />"></script>
<script type="text/javascript"
	src="<s:url value="/js/pwms.validate.js?v13" />"></script>
<script type="text/javascript"
	src="<s:url value="/js/divTuo.js" />"></script>
	<script type='text/javascript' src='<s:url value="/dwr/engine.js"/>'></script>
<script type='text/javascript' src='<s:url value="/dwr/interface/MccQuery.js"/>'></script>
<style type="text/css">
.fieldError {
	color: red;
	text-align: left;
}

.error {
	float: none;
	color: red;
	padding-left: .5em;
	vertical-align: top;
}

table th {
	font-weight: bolder;
	text-align: left;
	background-color: #5599FF;
}
</style>
<script type="text/javascript" language="javaScript">

	$(document).ready(function() {
		 selectMcc();
		 $(":input[name=athorityValue]").each(function(){
		 	var aVal=$(this).val();
		 	
		 	$(":checkbox[name='transTypes']").each(function(){
		 		var moduleval=$(this).val();
		 		if(aVal==moduleval){
		 			$(this).attr('checked',true);
		 		}
		 	});
	 	
	 	});
	 	$("#allCheck").click(function (){
			 	if(this.checked==true){
			 		$("input[name='transTypes']").attr("checked","true"); 
			 	}else{
			 		$("input[name='transTypes']").removeAttr("checked");
			 	}
		 		
		 	});
		
	}); 
	function selectMcc(){
		var sortCode = $("#mcc").val();
			//alert(sortCode);
			if (!sortCode) {
				return;
			}
			MccQuery.loadMccCode(sortCode, function(sortSmall) {
				fillSelect_sort("mccCodes", sortSmall);
			});
	}
	//进行遍历存值
	  	function fillSelect_sort(sid, address) {
	  		
				if (!address || !sid) {
					return;
				}
				var $select = $("#" + sid);
				$select.empty();
				if (address.length != 1) {
					$select.append("<option value=''>--请选择--</option>");
				}
				
				for ( var i = 0; i < address.length; i++) {
					$select.append("<option value='"+address[i].CODE+"'>"
							+ address[i].NAME + "</option>");
					//mccCode
					var one=$("#mccCode").val();//一级
					if(address[i].CODE== one){
						$("#"+sid).find("option[value="+one+"]").attr("selected",true);
					}
					
				}
		}
	function checkImgs(str){
		
		 $(document).ready(function () {
					 // alert("aa");
         	var htmls= "<div id='dlgTest' style='width:100%; height:500px; overflow:scroll;'><div align='right'><a href='javaScript:closeDiv()'>关闭</a><span ></div>"
						+"  <table cellspacing='0' width='90%'>"
						+"  <div> <img src='"+str+"' />  </div> </table></div>";
		      $.blockUI({ message:htmls, css: { width: '90%',top:'10px',left:'5%',overflow:'scroll'}});
        });
	}
	function closeDiv(){
		 $(document).ready(function () {
		      $.unblockUI();
        });
	}	
</script>

</head>

<body>
	
		<div class="subpage" >
			<s:form id="merinfoForm" action="/mer/checkMerFour.ct" method="post"  theme="simple" enctype="multipart/form-data">
				<s:hidden id="mcc" value="%{#request.mccType}"/>
				<s:hidden id="mccCode" value="%{merinfoDetail.mcc}"/>  
				<div class="user_title">
					<h2 class="headline-inquires">POS收单运营管理平台<br />
	    		 <span class="sub-title">

	    		 </span></h2>
				</div>
				
				 <s:iterator value="#request.valueList" status="stat" id="bean">
    				<s:hidden name="athorityValue" value="%{#bean}"></s:hidden>
   				</s:iterator>
   	
				<table width="100%" border="1" cellspacing="0" class="table">
					<tr>
						<td colspan="6" align="center">
							<input type="hidden" name="merinfo.mid"   value="<s:property value="merinfoDetail.mid"/>"/>
							<h2 class="headline-inquires">
								特约商户业务复审<br />
								<span class="sub-title"></span>
							</h2>
						</td>
					</tr>
					
					
					<tr>
						<th colspan="6">商户基本信息</th>
					</tr>
					
					<tr>
						<td style="width:10%;text-align: right;">商户类型：</td>
						
						<td style="width:20%"> 
							<s:if test="merinfoDetail.merKind==\"01\"">企业单位</s:if>
							<s:if test="merinfoDetail.merKind==\"02\"">个体工商户</s:if>
						 </td>
						<td style="width:10%;text-align: right;">所属机构：</td>
						
						<td style="width:20%"><s:property value="merinfoDetail.orgName"/>  </td>
						<td style="width:10%;text-align: right;">所属地区：</td>
						
						<td style="width:20%"> <s:property value="merinfoDetail.areaName"/> </td>
					</tr>
					<tr>
						<td style="text-align: right;">申请终端数量：</td>
						<td> <s:property value="merinfoDetail.terNums"/> </td>		
						<td style="text-align: right;">mcc码：</td>
						<td>
							<!-- 【<s:property value="merinfoDetail.mcc"/>】<s:property value="merinfoDetail.mccName"/> -->
							<select id="mccCodes" name="merinfo.mcc"  class="queryWidth"></select> <font color="red">*</font>
						 </td>
						<td style="text-align: right;">支付联行号：</td>
						
						<td><s:property value="merinfoDetail.settBankId"/> </td>
					</tr>
					<tr>
						
					</tr>
					<tr>
						<td style="text-align: right;">商户名称：</td>
						
						<td><s:property value="merinfoDetail.merName"/> </td>
						<td style="text-align: right;">营业名称：</td>
						
						<td><s:property value="merinfoDetail.merBrName"/> </td>
						<td style="text-align: right;">业务联系人：</td>
						
						<td><s:property value="merinfoDetail.interContact"/> </td>
					</tr>
					<tr>
						<td style="text-align: right;">商户英文名称：</td>
						
						<td><s:property value="merinfoDetail.engName"/> </td>
						<td style="text-align: right;">商户英文简称：</td>
						
						<td><s:property value="merinfoDetail.engBrName"/> </td>
						<td style="text-align: right;">开户行账户名：</td>
						
						<td>
							<s:property value="merinfoDetail.contact"/>
						 </td>
					</tr>
					<tr>
						
						<td style="text-align: right;">业务联系人电话：</td>
						
						<td ><s:property value="merinfoDetail.tel"/> </td>
						<td style="text-align: right;">邮件：</td>
						
						<td><s:property value="merinfoDetail.email"/></td>
						<td style="text-align: right;">传真：</td>
						
						<td><s:property value="merinfoDetail.fax"/> </td>
					</tr>
					
					<tr>
						
						
					</tr>
					<tr>
						<td style="text-align: right;">结算周期：</td>
						
						<td>
							<s:iterator value="#request.cycList" var="cy">
								<s:if test="#cy.cycleId==merinfoDetail.cycleId">
									<s:property value="#cy.cycleName"/>
								</s:if>
							</s:iterator>
						 </td>
						<td style="text-align: right;">开户银行：</td>
						
						<td><s:property value="merinfoDetail.accBank"/></td>
						<td style="text-align: right;">开户行账号：</td>
						
						<td>
							<s:property value="merinfoDetail.accNo"/>
						 </td>
					</tr>
					<tr>
						<td style="text-align: right;">商户扣率类型：</td>
						
						<td> 
							<s:if test="merinfoDetail.commMode==\"1\"">按回拥率收取</s:if>
							<s:if test="merinfoDetail.commMode==\"2\"">按笔收取</s:if>
							<s:if test="merinfoDetail.commMode==\"3\"">点数转封顶</s:if>
						 </td>
						<td style="text-align: right;">商户扣率：</td>
						
						<td><s:property value="merinfoDetail.commRate"/> </td>
						<td style="text-align: right;">封顶手续费金额：</td>
						
						<td><s:property value="merinfoDetail.commAmt"/>  </td>
					</tr>
					
					
					
					<tr>
						<td style="text-align: right;">法人姓名：</td>
						
						<td><s:property value="merinfoDetail.perName"/>  </td>
						<td style="text-align: right;">法人电话 ：</td>
						
						<td><s:property value="merinfoDetail.perPhone"/>  </td>
						<td style="text-align: right;">组织机构代码 ：</td>
						
						<td><s:property value="merinfoDetail.organizationCode"/>  </td>
					</tr>
					<tr>
						<td style="text-align: right;">法人证件类型：</td>
						
						<td>
							<s:if test="merinfoDetail.cardType ==\"01\"">身份证</s:if>
						</td>
						<td style="text-align: right;">法人证件号码 ：</td>
						<td ><s:property value="merinfoDetail.cardNo"/>  </td>
						<td style="text-align: right;">邮编：</td>
						
						<td><s:property value="merinfoDetail.zipCode"/> </td>
					</tr>
					<tr>
						<td style="text-align: right;">开户许可证：</td>
						
						<td><s:property value="merinfoDetail.bankLicense"/> </td>
						<td style="text-align: right;">营业执照号 ：</td>
						
						<td><s:property value="merinfoDetail.busLicense"/>  </td>
						<td style="text-align: right;">税务登记证：</td>
						
						<td><s:property value="merinfoDetail.taxRegCer"/> </td>
					</tr>
					<tr>
						
					
					</tr>
					
					<tr>
						<td style="text-align: right;">营业地址：</td>
						<td colspan="5"><s:property value="merinfoDetail.addr"/> </td>
					</tr>
					<tr>
						<td style="text-align: right;">备注：</td>
						<td colspan="5"><s:property value="merinfoDetail.meMo"/></td>

					</tr>
					<tr>
						<th colspan="6">附件信息</th>
					</tr>
					<tr>
						<td style="text-align: right;">法人证件：</td>
						
						<td   > 
        					<input id="fileIput" type="button" onclick="checkImgs('<s:property value='merinfoDetail.cardUrl'/>')" value="预览"/>
						 </td>
						<td style="text-align: right;" >开户行许可证：</td>
						
						<td  >
						<input id="fileIput" type="button" onclick="checkImgs('<s:property value='merinfoDetail.bankLicenseUrl'/>')" value="预览"/>
						</td>
						<td style="text-align: right;">营业执照：</td>
						
						<td colspan="3" ><input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.businessLUrl'/>')"  type="button" value="预览"/>
						</td>
					</tr>
					 
					<tr>
						<td style="text-align: right;">组织机构代码：</td>
						
						<td ><input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.organizationCodeUrl'/>')"  type="button" value="预览"/>
						</td>
						<td style="text-align: right;">税务登记证：</td>
						
						<td ><input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.taxRegCerUrl'/>')"  type="button" value="预览"/>
						</td>
						<td style="text-align: right;">营业场地图片：</td>
						
						<td  ><input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.placeOfBusUrl'/>')"  type="button" value="预览"/>
						</td>
					</tr>
					
					<tr>
						<td style="text-align: right;">租赁合同：</td>
						
						<td  ><input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.picUrl1'/>')"  type="button" value="预览"/>
						</td>
						<td style="text-align: right;">商户信息调查表：</td>
						
						<td ><input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.picUrl2'/>')"  type="button" value="预览"/>
						</td>
						<td style="text-align: right;">门头照：</td>
						
						<td  > <input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.picUrl3'/>')"  type="button" value="预览"/>
						</td>
					</tr>
					
					
					<tr>
						<td style="text-align: right;">收银台照片：</td>
						
						<td ><input id="fileIput" type="button" onclick="checkImgs('<s:property value='merinfoDetail.picUrl4'/>')"  value="预览"/>
						</td>
						<td style="text-align: right;">合作协议1：</td>
						
						<td  ><input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.picUrl5'/>')"  type="button" value="预览"/>
						</td>
						<td style="text-align: right;">合作协议2：</td>
						
						<td  ><input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.picUrl6'/>')"  type="button" value="预览"/>
						</td>
					</tr>
					
					<tr>
						<td style="text-align: right;">备注：</td>
						
						<td  ><input id="fileIput" onclick="checkImgs('<s:property value='merinfoDetail.picUrl7'/>')"  type="button" value="预览"/>
						</td>
					</tr>
					<tr>
						<th colspan="6">申请终端列表</th>
					</tr>
					<tr>
						<td colspan="6">
							<table width="100%">
								<tr>
									<td style="text-align: center;"><b>终端号码</b></td>
									<td style="text-align: center;"><b>门店名称</b></td>
									<td style="text-align: center;"><b>终端类型</b></td>
									<td style="text-align: center;"><b>机器序列号</b></td>
									<td style="text-align: center;"><b>终端安装地址</b></td>
									<td style="text-align: center;"><b>备注</b></td>
								</tr>
								<s:iterator value="#request.terList" var="ter">
									<tr>
									<td><s:property value="#ter.tid"/> </td>
									<td><s:property value="#ter.termName"/> </td>
									<td>
										<s:if test="#ter.tidKind==\"01\"">移动</s:if>
										<s:if test="#ter.tidKind==\"02\"">固定</s:if>
									</td>
									<td><s:property value="#ter.serialNum"/></td>
									<td><s:property value="#ter.termAddress"/></td>
									<td><s:property value="#ter.note"/></td>
								</tr>
								</s:iterator>
							</table>
						</td>
					</tr>
					<tr>
						<th colspan="6">开通功能</th>
					</tr>
					<tr>
						<td>
						（基本功能:<input id="allCheck" type="checkbox" />）
						</td>
						<td colspan="5">
								
									<s:checkboxlist name="transTypes" list="#request.tranTypeList" listKey="key" listValue="value"></s:checkboxlist>
							
						</td>
					</tr>
					<tr>
						<th colspan="6">风控限额</th>
					</tr>
					<tr>
						<td>贷记卡单笔限额：</td>
						
						<td><s:property value="merinfoDetail.amount1"/> </td>
						<td>贷记卡单日限额：</td>
						
						<td><s:property value="merinfoDetail.dayAmount1"/> </td>
						<td>贷记卡单月限额：</td>
						
						<td><s:property value="merinfoDetail.mouthAmount1"/> </td>
					</tr>
					<tr>
						<td>借记卡单笔限额 ：</td>
						
						<td><s:property value="merinfoDetail.amount2"/> </td>
						<td>借记卡单日限额：</td>
						
						<td><s:property value="merinfoDetail.dayAmount2"/></td>
						<td>借记卡单月限额：</td>
						 
						<td><s:property value="merinfoDetail.mouthAmount2"/> </td>
					</tr>
					
					<tr>
						<th colspan="6">审核意见</th>
					</tr>
					<tr>
						<td colspan="6">
						<table width="100%">
							<tr>
								<td width="8%">审核操作</td>
								<td>审核意见</td>
								<td width="10%">审核人员</td>
								<td width="10%">审核时间</td>
							</tr>
							<s:if test="#request.audtingList!=null">
								<s:iterator value="#request.audtingList" var="au">
									<tr>
										
										<td>
											<s:property value="#au.audit_name"/>
										</td>
										
										<td >
											<s:property value="#au.result_detail"/>
										</td>
										<td><s:property value="#au.operators"/></td>
										<td>
											<s:date name="#au.dtCreate"/>
										</td>
									</tr>
								</s:iterator>
							</s:if>
							<s:else>无意见</s:else>
						</table>
					</td>
					</tr>
					<tr>
						<th colspan="6">复审意见信息</th>
					</tr>
					<tr>
						<td>申请人：</td>
						<td colspan="5"><s:property value="merinfoDetail.opertors"/> </td>
					</tr>
					<tr>
						<td>审核结果：</td>
						
						<td colspan="5">
							<s:radio id="result_code" name="auditing.result_code" list="#request.auditingMap" listKey="key" listValue="value"></s:radio>
							<strong id="one" style="color:red;"></strong>
						 </td>
					</tr>
					<tr>
						<td align="right">审核意见：</td>
						<td colspan="5"><s:textarea onpropertychange="checkLength(this,150);" oninput="checkLength(this,150);" rows="5" id="result_detail" cssStyle="width:100%;"
								name="auditing.result_detail" />
								<strong id="two" style="color:red;"></strong>
								</td>

					</tr>
					<tr>
						<td colspan="6" align="center"><span style="color: red"><s:actionerror /></span>
							<span style="color: red;"><s:actionmessage /></span > <span style="color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
					<tr>
						<td align="center" colspan="6"><s:submit id="btnAdd"value="保  存" /> &nbsp;&nbsp; 
								<input type="reset"" value="取  消"/></td>
					</tr>
					
				</table>

			</s:form>
		</div>
	
</body>
</html>
